import {
  post,
  post2,
  fetch,
  fetch3,
  upload,
  upload2,
  patch,
  put,
  fetch2
} from './request.js';

export const Login = params => post("/user/token/login", params);
export const Register = params => post("/user/token/register", params);
export const sysModeAll = params => fetch("/sysMode/selectAll", params);
export const sysSelectNodesInfo = params => fetch("/sysNode/selectNodesInfo", params);
export const logout = params => fetch("/user/token/logout", params);
export const captcha = params => fetch3("/user/token/captcha", params);

// 条件查询
export const getFind = params => post("/flow/getMainTableByCondition", params);
export const getAuthorByNodeID = params => fetch("/admin/findAuthorByNodeID", params);
export const getAuditSearch = params => post("/flow/getMainTableByConditionByName", params);

// 文件操作
export const fileUploadFile = formData => upload("/file/uploadFile", formData)
export const downloadFile = params => fetch("/file/downloadFileByLink", params)

// 获取用户信息
export const getUserInfo = params => fetch("/user/getUserInfo", params);

// 流程管理 -- 实施方案
export const EmbodimentCreate = params => post("/flow/create", params);
export const getEmbodimentCreate = params => fetch("/flow/selectAllFlow", params);
export const getMyToDoList = params => fetch("/flow/myToDoList", params);
export const getAuditFlowDetails = params => fetch("/flow/selectFlowDetails", params);
export const getAuditAllRecords = params => fetch("/flow/getAllRecords", params);

// 流程管理 -- 设计方案

// 流程管理 -- 招投标流程


// 单位管理
export const getMembers = params => fetch("/admin/userCombox/findAllByPage", params);
export const checkUser = params => post("/user/checkUser", params);
export const getImplmentNodes = params => fetch("/sysMode/findImplmentNodes", params);
export const getAllByPage = params => fetch("/admin/userCombox/findAllByPage", params);
export const sysSaveOne = params => post("/flow/config/saveOne", params);
export const getAllConfigRecords = params => fetch("/flow/config/getAllConfigRecords", params);
export const embodimentDeleteOne = params => fetch("/flow/config/deleteOne", params);

// 流程信息配置
export const getAllProjectType = params => fetch("/admin/findAllProjectType", params);
export const modifyProjectType = params => post("/admin/modifyProjectType", params);
export const deleteProjectType = params => fetch("/admin/deleteProjectType", params);

// 个人中心
export const updatePassword = params => fetch("/user/token/updatePassword", params);
